package code.noname;

import static java.lang.System.out;

import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterSuite;

public class NewTest {

    @Test(dataProvider = "dp")
    public void f(Integer n, String s) {
    }

    @BeforeSuite
    public void beforeSuite() {
	out.println("before suite");
    }

    @AfterSuite
    public void afterSuite() {
	out.println("after suite");
    }

    @BeforeClass
    public void beforeClass() {
	out.println("before class");
    }

    @AfterClass
    public void afterClass() {
	out.println("after class");
    }

    @BeforeMethod
    public void beforeMethod() {
	out.println("before method");
    }

    @AfterMethod
    public void afterMethod() {
	out.println("after method");
    }

    @BeforeTest
    public void beforeTest() {
	out.println("before test");
    }

    @AfterTest
    public void afterTest() {
	out.println("after test");
    }

    @DataProvider
    public Object[][] dp() {
	return new Object[][] {
		new Object[] { 1, "a" },
		new Object[] { 2, "b" },
	};
    }

    @Test
    public void firstTest() {
	out.println("first test");
    }

    @Test
    public void secondTest() {
	out.println("second test");
    }

    @Test
    public void thirdTest() {
	out.println("third test");
    }
}
